function plotCellParameters(handles, whereToPlot)
% plotCellParameters
%
% Editing:
% gs april 2005
% -------------------------------------------------------

if nargin == 1
    hfig = figure;
    set(hfig, 'Color', 'w', 'Position', [126   816   342   283]);
end

RCaxis = 1:length(handles.data.map.mapAvg.rseries);
RCaxis = (RCaxis - 1) * handles.data.analysis.RsSkipVal;
plot(RCaxis, handles.data.map.mapAvg.rseries, 'b-', ...
    RCaxis, handles.data.map.mapAvg.rmembrane, 'g-');
try % kluge. gs 2006 04 28
    set(gca, 'XLim', [0 max(RCaxis)], 'YLim', [0 max(get(gca, 'YLim'))]);
    xlabel('Trace');
    ylabel('Rs (Mohm), Rm (Mohm)');
    legend('Rs', 'Rm', 0);
catch
    disp('plotCellParameters: no data for auto-adjusting axis limits');
end

if handles.data.analysis.numberOfMaps > 1
    M = handles.data.analysis.numberOfMaps;
    N = handles.data.map.mapActive.numTraces;
    for Q = 1 : handles.data.analysis.numberOfMaps - 1
        hline = line([Q*N Q*N], get(gca, 'YLim'), 'Color', 'k');
    end
end